package day03.note;

public class txt7 {
    public static void main(String[] args) {
        int n=100000;
        while (n<=999999)  {
            int a = n / 100000 % 10;
            int b = n / 10000 % 10;
            int c = n / 1000 % 10;
            int d = n / 100 % 10;
            int e = n / 10 % 10;
            int f = n / 1 % 10;

            double r = Math.pow(a, 6) + Math.pow(b, 6) + Math.pow(c, 6) + Math.pow(d, 6) + Math.pow(e, 6)+ Math.pow(f, 6);

            if (r == n) {
                System.out.println(n);
            }
            n++;

        }








    }
}
